home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Communication / PhoneMemo / Source / TurboTFCell.h < prev    next >
Text File  |  1992-07-23  |  1KB  |  46 lines

  1. /* TurboTFCell.h
  2.  *
  3.  *   TurboTFCell is a subclass of TextFieldCell which supports
  4.  *        a) length-watching on a string -- maxLength  [length of 0
  5.  *            indicates that length-watching is not active]
  6.  *        b) auto-jumping to nextText if the maximum is reached
  7.  *        c) acceptsReturn will cause the Return character to be
  8.  *            interpreted literally rather than as a signal to end editing
  9.  * 
  10.  *
  11.  * You may freely copy, distribute, and reuse the code in this example.
  12.  * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
  13.  * fitness for any particular use.
  14.  *
  15.  * Written by:  Sharon Zakhour 
  16.  * Created:  Oct/91
  17.  */
  18.  
  19. #import <appkit/appkit.h>
  20.  
  21. @interface TurboTFCell:TextFieldCell
  22. {
  23.     NXTextFilterFunc customTextFilter;
  24.     int        maxLength;
  25.     BOOL    autoJump;
  26.     BOOL    acceptsReturn;
  27.     char     *originalText;
  28. }
  29.  
  30. char *lengthFilter(id textObj, char *inputText, int *inputLength, int position);
  31. unsigned short autoJumpCharFilter(unsigned short charCode, int flags, unsigned short charSet);
  32.  
  33. - setMaxLength: (int) length;
  34. - (int) maxLength;
  35. - setAutoJump: (BOOL) flag forLength: (int)length;
  36. - (BOOL) autoJump;
  37. - setAcceptsReturn: (BOOL) flag;
  38. - (BOOL) acceptsReturn;
  39. - setOriginalText: (char *)aString;
  40. - (char *)originalText;
  41. - setCustomFilter: (NXTextFilterFunc)aFilter;
  42. - (NXTextFilterFunc) customTextFilter;
  43. - (BOOL)checkString: (char *)aString;
  44.  
  45. @end
  46.